// 天气数据接口
export interface Weather {
  id: string
  city: string
  temperature: number
  temperatureUnit: string
  humidity: number
  windSpeed: number
  windDirection: string
  condition: string
  conditionCode: string
  icon: string
  description: string
  pressure: number
  visibility: number
  sunrise: string
  sunset: string
  timestamp: string
  lastUpdated: string
}

// 天气记录接口
export interface WeatherRecord extends Weather {
  recordId: string
  createdAt: string
  updatedAt?: string
  isManual?: boolean
  notes?: string
}

// 筛选选项接口
export interface FilterOptions {
  startDate: Date | null
  endDate: Date | null
  cities?: string[]
  conditions?: string[]
  temperatureRange?: {
    min: number
    max: number
  }
}

// API响应接口
export interface ApiResponse<T> {
  success: boolean
  data?: T
  error?: string
}

// 天气预报接口
export interface WeatherForecast {
  date: string
  tempMin: number
  tempMax: number
  condition: string
  icon: string
  humidity: number
  windSpeed: number
  precipitation: number
}

// 城市信息接口
export interface City {
  id: string
  name: string
  country: string
  lat: number
  lon: number
  timezone: string
}

// 图表数据接口
export interface ChartData {
  labels: string[]
  datasets: {
    label: string
    data: number[]
    borderColor?: string
    backgroundColor?: string
  }[]
}

// 主题配置接口
export interface ThemeConfig {
  mode: 'light' | 'dark'
  primaryColor: string
  chartColors: string[]
}

// 应用配置接口
export interface AppConfig {
  temperatureUnit: 'C' | 'F'
  language: 'zh-CN' | 'en-US'
  autoRefresh: boolean
  refreshInterval: number
  theme: ThemeConfig
}

// 空气质量数据类型
export interface AirQuality {
  aqi: number
  level: number
  category: string
  primary: string
  pm10: number
  pm2p5: number
  no2: number
  so2: number
  co: number
  o3: number
  updateTime: string
}

// 天气指数数据类型
export interface WeatherIndex {
  date: string
  type: number
  name: string
  level: number
  category: string
  text: string
} 